#define _CRT_SECURE_NO_WARNINGS 1
#include"BSTree.h"



void BST_test()
{
	int a[] = { 8, 3 ,10, 6, 4, 7, 14, 13 };
	A::BSTree<int> bst;
	for (auto e : a)
		bst.Insert(e);
	bst.InOrder();
	cout << endl;
	cout << bst.Find(2) << endl;
	cout << bst.Find(1) << endl;
	bst.Erease2(3);
	bst.InOrder();
	cout << endl;
	bst.Erease2(8);
	bst.InOrder();
	cout << endl;

	bst.Erease2(10);
	bst.InOrder();
	cout << endl;

	for (auto e : a)
	{
		bst.Erease2(e);
		if (bst.getRoot() == nullptr)
			break;
		bst.InOrder();
		cout << endl;

	}





}

int main()
{
	//A::BSTreeNode<int> b(1);
	//A::BSTreeNode<int>* ptrb = &b;
	BST_test();

	return 0;
}